package com.yjd.comm.borrow.service;

import com.yjd.comm.base.service.IBaseService;
import com.yjd.comm.borrow.model.UserBorrowModel;
import com.yjd.comm.system.dto.OperParamDto;

/**
 * <b>description</b>：会员借款相关信息业务接口<br>
 * <b>time</b>：2014-12-26 09:17:05 <br>
 * <b>author</b>： ready likun_557@163.com
 */
public interface IUserBorrowService extends IBaseService {
	/**
	 * 插入
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public UserBorrowModel insert(UserBorrowModel model) throws Exception;

	/**
	 * 更新,大于等于1表示成功，其他失败
	 * 
	 * @param model
	 * @return
	 * @throws Exception
	 */
	public int update(UserBorrowModel model) throws Exception;

	/**
	 * 根据id删除,大于等于1表示成功，其他失败
	 * 
	 * @param user_id
	 * @return
	 * @throws Exception
	 */
	public int delete(Long user_id) throws Exception;

	/**
	 * 对用户表借款信息的某些字段进行添加操作
	 * 
	 * @param user_id
	 *            用户id，必填
	 * @param model
	 *            用户借款信息
	 * @return
	 */
	public int incrByUserId(Long user_id, UserBorrowModel model)
			throws Exception;

	/**
	 * 更新信用额度
	 * 
	 * @param userBorrowModel
	 * @param operParamDto
	 * @return
	 * @throws Exception
	 */
	public int updateCredit(UserBorrowModel userBorrowModel,
			OperParamDto operParamDto) throws Exception;

}
